import { Entity, PrimaryGeneratedColumn, ManyToOne, Column, } from 'typeorm';
import { UsersEntity } from '../users/users.entity';

@Entity({ name: 'custom' })
export class CustomEntity {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @ManyToOne(
    () => UsersEntity,
    user => user.custom,
  )
  user: UsersEntity;

  @Column('varchar')
  field: string;

  @Column({type:'varchar',length:'2000'})
  value: string;
}
